package com.yunche.yunchebusiness.api

import com.yunche.yunchebusiness.common.Constant
import com.yunche.yunchebusiness.utils.SpHelper

/**
 * Create by Crcker on 2018/12/20 11:17
 * Email: Crcker@163.com
 */


object Api {

    //线上
    const val BASE_URL = "http://47.110.7.61"

   // const val BASE_URL = "http://47.96.78.20"

    const val BASE_PORT = 8016

    //公共服务
    const val COMMON_URL = "http://47.97.122.31"
    const val COMMON_PORT = 8888
    const val VERSION_PORT = 8020

    const val URL_TYPE_BASE = "base"
    const val URL_TYPE_COMMON = "common"


    const val BASE = "basePort"
    const val COMMON = "commonPort"
    const val CHECH_VERSION = "checkVersion"


    const val URL_TYPE_KEY = "urlType"
    const val PORT_TYPE_KEY = "portType"


    fun getUserName(): String = SpHelper.getValue(Constant.SP_KEY.USER_NAME, "")
    fun getPassword(): String = SpHelper.getValue(Constant.SP_KEY.PASSWORD, "")
    fun getToken(): String = SpHelper.getValue(Constant.SP_KEY.TOKEN, "")
    fun isSetGesture(): Boolean = SpHelper.getValue(Constant.SP_KEY.IS_SET_GESTURE, false)
    fun getTenantId(): String = SpHelper.getValue(Constant.SP_KEY.TENANT_ID, "")
}